package com.wrbug.mmkw.compile

import com.squareup.javapoet.TypeName

/**
 *   MethodInfo.java
 *   author: wrbug
 *   date: 2019-09-24 09:53
 *
 */

class MethodInfo(var originMethodName: String) {
    var returnType: TypeName? = null
    var mmkvReturnType: MmkvReturnType? = null
    var needConvert = false
    var key: String = ""
    var mmkvType: MmkvType = MmkvType.UN_KNOW
    var parameter: TypeName? = null

}

enum class MmkvReturnType(val mmkvMethod: String) {
    BOOL(MmkvMethod.DECODE_BOOL),
    INT(MmkvMethod.DECODE_INT),
    LONG(MmkvMethod.DECODE_LONG),
    FLOAT(MmkvMethod.DECODE_FLOAT),
    DOUBLE(MmkvMethod.DECODE_DOUBLE),
    STRING(MmkvMethod.DECODE_STRING),
    BYTES(MmkvMethod.DECODE_BYTES)
}

enum class MmkvType {
    SET, GET, REMOVE,UN_KNOW
}